import http from './http'
import base from './base'


// 验证码
function getCaptchaJpg(params){
    return http.get(`${base.sq}/asxc/captcha.jpg`,{params:params})
}
// 注册
function registerApi(params){
  return http.post(`${base.sq}/asxc/app/register`,params)
}
// 登录
function loginApi(params){
  return http.post(`${base.sq}/asxc/app/login`,params)
}
// 用户信息
function inforApi(params){
  return http.get(`${base.sq}/asxc/app/usraccount/info`,{params:params})
}
// 获取充值套餐
function allsetsApi(params){
  return http.get(`${base.sq}/asxc/app/topup/allsets`,{params:params})
}
// 添加车牌
function carplateAddApi(params){
  return http.post(`${base.sq}/asxc/app/carplate/add`,params)
}
// 获取openid
function getOpenId(){
  return http.post(`${base.sq}/wx/order/getWxConfig`,'')
}
// 退出
function logout(){
  return http.get(`${base.sq}/asxc/app/logout`,'')
}
// 充值记录
function topupHis(params){
  return http.post(`${base.sq}/asxc/app/topup/his`,params)
}
// 消费账单记录
function billHis(params){
  return http.post(`${base.sq}/asxc/app/bill/his`,params)
}
// 获取微信code
function wxlogin(params){
  return http.get(`${base.sq}/asxc/app/wxlogin`,{params:params})
}
// 获取微信支付参数
function postwxpay(params){
  return http.post(`${base.sq}/asxc/app/topup/postwxpay`,params)
}
// 未登录支付
function preloginwxpay(params){
  return http.post(`${base.sq}/asxc/app/topup/preloginwxpay`,params)
}



export default {
  getCaptchaJpg,
  registerApi,
  loginApi,
  inforApi,
  allsetsApi,
  carplateAddApi,
  getOpenId,
  logout,
  topupHis,
  billHis,
  wxlogin,
  postwxpay,
  preloginwxpay
}
